#Boa:Dialog:Dialog2

import wx

def create(parent):
    return Dialog2(parent)

[wxID_DIALOG2, wxID_DIALOG2BOTONACEPTAR, wxID_DIALOG2BOTONCANCELAR, 
 wxID_DIALOG2TEXTO, 
] = [wx.NewId() for _init_ctrls in range(4)]

class Dialog2(wx.Dialog):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Dialog.__init__(self, id=wxID_DIALOG2, name='', parent=prnt,
              pos=wx.Point(444, 270), size=wx.Size(312, 200),
              style=wx.DEFAULT_DIALOG_STYLE, title=u'Confirmaci\xf3n requerida')
        self.SetClientSize(wx.Size(304, 168))

        self.texto = wx.StaticText(id=wxID_DIALOG2TEXTO, label=' ',
              name='texto', parent=self, pos=wx.Point(32, 16), size=wx.Size(3,
              13), style=0)

        self.botonAceptar = wx.Button(id=wxID_DIALOG2BOTONACEPTAR,
              label='Aceptar', name='botonAceptar', parent=self,
              pos=wx.Point(24, 136), size=wx.Size(75, 23), style=0)
        self.botonAceptar.Bind(wx.EVT_BUTTON, self.OnBotonAceptarButton,
              id=wxID_DIALOG2BOTONACEPTAR)

        self.botonCancelar = wx.Button(id=wxID_DIALOG2BOTONCANCELAR,
              label='Cancelar', name='botonCancelar', parent=self,
              pos=wx.Point(200, 136), size=wx.Size(75, 23), style=0)
        self.botonCancelar.Bind(wx.EVT_BUTTON, self.OnBotonCancelarButton,
              id=wxID_DIALOG2BOTONCANCELAR)

    def __init__(self, parent, texto, default=""):
        self._init_ctrls(parent)
        self.padre = parent
        self.texto.SetLabel(texto)
        self.opcion = False
        if default=="no": self.botonCancelar.SetFocus()

    def OnBotonAceptarButton(self, event):
        self.opcion = True
        self.Close()

    def OnBotonCancelarButton(self, event):
        self.opcion = False
        self.Close()

    def getSeleccion(self):
        return self.opcion
    